/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package oba;

import common.util.HibernateUtil;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.swing.UIManager;
import javax.swing.UnsupportedLookAndFeelException;
import main_frame.MainFrame;
import system.SystemConnection;
import zsystem.Resource;

/**
 *
 * @author Rabid
 */
public class Oba {

    private static main_frame.MainFrame mainFrame;

    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {
//        HibernateUtil.SetSessionFactory();
        SystemConnection.CreatConnections("com.mysql.jdbc.Driver", "jdbc:mysql://localhost:3306/oba_vck", "root", "");
        Resource.getYear();
        Resource.conect();
        try {
            UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
            mainFrame = new MainFrame();
            mainFrame.setVisible(true);
        } catch (UnsupportedLookAndFeelException ex) {
            Logger.getLogger(Oba.class.getName()).log(Level.SEVERE, null, ex);
        } catch (ClassNotFoundException ex) {
            Logger.getLogger(Oba.class.getName()).log(Level.SEVERE, null, ex);
        } catch (InstantiationException ex) {
            Logger.getLogger(Oba.class.getName()).log(Level.SEVERE, null, ex);
        } catch (IllegalAccessException ex) {
            Logger.getLogger(Oba.class.getName()).log(Level.SEVERE, null, ex);
        }
    }

}
